#!/bin/sh

TARGET_DIR="bin boot dev etc hsfm lib lib64 mnt proc root sbin sys tmp usr usr/bin usr/sbin var"

## $TOP_ROOT/rootfs
mkdir -p $TOP_ROOT/rootfs 
cd $TOP_ROOT/rootfs

for i in $TARGET_DIR ;do
	mkdir -p $i
done

cp $TOP_ROOT/tools/busybox bin
cp $TOP_ROOT/tools/lnbusybox.sh .

sudo chroot $TOP_ROOT/rootfs /bin/busybox sh /lnbusybox.sh
